package com.linkallcloud.core.util;

import java.util.Random;

public class AdminLTEColors {

    private static final String[] BG_COLORS = { "bg-light-blue", "bg-aqua", "bg-green", "bg-yellow", "bg-red",
            "bg-gray", "bg-navy", "bg-teal", "bg-purple", "bg-orange", "bg-maroon", "bg-black", "bg-light-blue-active",
            "bg-aqua-active", "bg-green-active", "bg-yellow-active", "bg-red-active", "bg-gray-active",
            "bg-navy-active", "bg-teal-active", "bg-purple-active", "bg-orange-active", "bg-maroon-active",
            "bg-black-active", "bg-light-blue disabled", "bg-aqua disabled", "bg-green disabled", "bg-yellow disabled",
            "bg-red disabled", "bg-gray disabled", "bg-navy disabled", "bg-teal disabled", "bg-purple disabled",
            "bg-orange disabled", "bg-maroon disabled", "bg-black disabled" };

    private static final String[] BG_COLORS_WARN = { "bg-yellow", "bg-red", "bg-purple", "bg-orange", "bg-maroon",
            "bg-yellow-active", "bg-red-active", "bg-purple-active", "bg-orange-active", "bg-maroon-active",
            "bg-yellow disabled", "bg-red disabled", "bg-purple disabled", "bg-orange disabled", "bg-maroon disabled" };

    public static String bgColorClass(int index) {
        if (index < 0 || index >= BG_COLORS.length) {
            Random r = new Random();
            index = r.nextInt(BG_COLORS.length - 1);
        }
        return BG_COLORS[index];
    }

    public static String bgWarnColorClass(int index) {
        if (index < 0 || index >= BG_COLORS_WARN.length) {
            Random r = new Random();
            index = r.nextInt(BG_COLORS_WARN.length - 1);
        }
        return BG_COLORS_WARN[index];
    }

}
